package guess;

import java.util.Objects;
import java.util.Scanner;

/**
 * @classname:User
 * @description:
 * @author: Mr.Z
 * @date: 2020/11/27 19:36
 * @version: 0.1
 * @since:1.8
 */
public class User {
    private String name;
    private int score;

    public User() {
    }
    public User(String name, int score) {
        this.name = name;
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public static int showFist(Scanner input){
        Objects.requireNonNull(input,"参数不能为null");
        System.out.println("请出拳1.剪刀 2.石头 3.布");
        String result = "";
        int userFit = input.nextInt();
        switch (userFit){
            case 1:
                result = "剪刀";
                break;
            case 2:
                result = "石头";
                break;
            case 3:
                result = "布";
                break;
        }
        System.out.println("你出拳"+result);
        return userFit;
    }
}
